package org.datamining.guha.utils;
/*
import java.awt.geom.Rectangle2D;
import java.io.File;
import java.io.FileOutputStream;
import java.io.OutputStreamWriter;
import java.io.Writer;

import org.jfree.chart.JFreeChart;
import org.w3c.dom.DOMImplementation;
import org.w3c.dom.Document;
*/
//import org.apache.batik.svggen.SVGGraphics2D;
//import org.apache.batik.dom.GenericDOMImplementation;

public class MyChartUtils {

	public MyChartUtils() {}
	
    /**
     * Save chart as SVG file.
     * Required libs: Apache Batik (batik-svggen.jar, batik-dom.jar, dom.jar).
     *
     * @param chart JFreeChart to save.
     * @param fileName Name of file to save chart in.
     * @param width Width of chart graphic.
     * @param height Height of chart graphic.
     * @throws Exception if failed.
     */
	/*
    public void saveChartToSVG(JFreeChart chart, String fileName, int width, int height) throws Exception {
        if (chart != null) {
            if (fileName == null) {
                fileName = "chart.svg";
            }
            DOMImplementation domImpl = GenericDOMImplementation.getDOMImplementation();
            Document document = domImpl.createDocument(null, "svg", null);
            SVGGraphics2D svgGenerator = new SVGGraphics2D(document);
            chart.draw(svgGenerator, new Rectangle2D.Double(0, 0, width, height), null);
           
            boolean useCSS = true;
                Writer out = new OutputStreamWriter(new FileOutputStream(new File(fileName)),"UTF-8");
                svgGenerator.stream(out, useCSS);
        }
    }//saveChartToSVG()
    */
}
